<!DOCTYPE html>
<!-- saved from url=(0076)https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN -->
<html lang="en" class="devsite js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms no-csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths wf-opensans-n4-active wf-active" style=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script src="./Python 开发服务器 - Google App Engine — Google Developers_files/cb=gapi.loaded_0" async=""></script><script type="text/javascript" async="" src="./Python 开发服务器 - Google App Engine — Google Developers_files/plusone.js" gapi_processed="true"></script>
    <meta charset="utf-8">
    <script src="./Python 开发服务器 - Google App Engine — Google Developers_files/script_head.js"></script>
    <link rel="stylesheet" type="text/css" href="./Python 开发服务器 - Google App Engine — Google Developers_files/screen.css">
    <link rel="shortcut icon" href="https://developers.google.com/_static/images/favicon.ico">
    <link rel="apple-touch-icon" href="https://developers.google.com/_static/images/apple-touch-icon.png">
    <link href="./Python 开发服务器 - Google App Engine — Google Developers_files/css" rel="stylesheet" type="text/css">
    
    <script src="./Python 开发服务器 - Google App Engine — Google Developers_files/jquery.min.js"></script>
    <script id="jqueryui" src="./Python 开发服务器 - Google App Engine — Google Developers_files/jquery-ui.min.js"></script>
    <script src="./Python 开发服务器 - Google App Engine — Google Developers_files/jsapi"></script>

    <script type="text/javascript" src="./Python 开发服务器 - Google App Engine — Google Developers_files/api.js"></script>
    <script type="text/javascript" src="./Python 开发服务器 - Google App Engine — Google Developers_files/saved_resource"></script>
    <!--[if lt IE 9]>
    <script src="/_static/js/html5shim/html5.js"></script>
    <![endif]-->

    
  <script type="text/javascript">
    var contentTimer = new window.jstiming.Timer();

    var ___gcfg = ___gcfg || {};
    ___gcfg.lang = 'zh-cn';
  </script>
  
  <title>Python 开发服务器 - Google App Engine — Google Developers</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans">
  
  
  
    
    
    
  


    
    

  <style>.a-b-c{position:relative;display:-moz-inline-box;display:inline-block}* html .a-b-c,*:first-child+html .a-b-c{display:inline}.a-d-e{margin:2px;border:0;padding:0;font-family:Arial,sans-serif;color:#000;background:#ddd url(//ssl.gstatic.com/editor/button-bg.png) repeat-x top left;text-decoration:none;list-style:none;vertical-align:middle;cursor:default;outline:none}.a-d-e-f-g,.a-d-e-h-g{border-style:solid;border-color:#aaa;vertical-align:top}.a-d-e-f-g{margin:0;border-width:1px 0;padding:0}.a-d-e-h-g{-moz-box-orient:vertical;margin:0 -1px;border-width:0 1px;padding:3px 4px;white-space:nowrap}* html .a-d-e-h-g{left:-1px}* html .a-d-e-i .a-d-e-f-g{left:-1px}* html .a-d-e-i .a-d-e-h-g{right:auto}*:first-child+html .a-d-e-h-g{left:-1px}*:first-child+html .a-d-e-i .a-d-e-h-g{left:1px}::root .a-d-e{line-height:0}::root .a-d-e-f-g{line-height:0}::root .a-d-e-h-g{line-height:normal}.a-d-e-j{background-image:none!important;opacity:.3;-moz-opacity:.3;filter:alpha(opacity=30)}.a-d-e-j .a-d-e-f-g,.a-d-e-j .a-d-e-h-g{color:#333!important;border-color:#999!important}* html .a-d-e-j,*:first-child+html .a-d-e-j{margin:2px 1px!important;padding:0 1px!important}.a-d-e-k .a-d-e-f-g,.a-d-e-k .a-d-e-h-g{border-color:#9cf #69e #69e #7af!important}.a-d-e-l,.a-d-e-m{background-color:#bbb;background-position:bottom left}.a-d-e-n .a-d-e-f-g,.a-d-e-n .a-d-e-h-g{border-color:orange}.a-d-e-o-p,.a-d-e-o-p .a-d-e-f-g,.a-d-e-o-p .a-d-e-h-g{margin-right:0}.a-d-e-o-q,.a-d-e-o-q .a-d-e-f-g{margin-left:0}.a-d-e-o-q .a-d-e-h-g{margin-left:0;border-left:1px solid #fff}.a-d-e-o-q.a-d-e-m .a-d-e-h-g{border-left:1px solid #ddd}* html .a-d-e-o-q .a-d-e-h-g,*:first-child+html .a-d-e-o-q .a-d-e-h-g{left:0}.a-r-e{position:relative;margin:2px;border:1px solid #000;padding:2px 6px;font:normal 13px "Trebuchet MS",Tahoma,Arial,sans-serif;color:#fff;background-color:#8c2425;cursor:pointer;outline:none}.a-r-e-j{border-color:#888;color:#888;background-color:#ccc;cursor:default}.a-r-e-k{border-color:#8c2425;color:#8c2425;background-color:#eaa4a5}.a-r-e-l,.a-r-e-s,.a-r-e-m{border-color:#5b4169;color:#5b4169;background-color:#d1a8ea}.a-r-e-n{border-color:#5b4169}.a-r-e-o-p{margin-right:0}.a-r-e-o-q{margin-left:0;border-left:none}.a-e{color:#036;border-color:#036;background-color:#69c}.a-e-j{border-color:#333;color:#333;background-color:#999}.a-e-k{color:#369;border-color:#369;background-color:#9cf}.a-e-l{color:#69c;border-color:#69c}</style><link href="./Python 开发服务器 - Google App Engine — Google Developers_files/table.css" rel="stylesheet" type="text/css"></head>
  <body class="two-column docs" style="">
    
    <div id="sandbar">
      
      




<header id="gc-googlebar">

  <a id="gc-logo" href="https://developers.google.com/?hl=zh-CN">
    <img src="./Python 开发服务器 - Google App Engine — Google Developers_files/developers-logo.svg" alt="Google">
  </a>
<script>
if (!Modernizr || !Modernizr.svg) {
  $('#gc-logo img').attr({src:'/_static/images/developers-logo.png'});
}
</script>

  <div class="gc-social">
    
    <span class="signed-in">
      <div>
        <a class="email" href="https://plus.google.com/me">luzky12@gmail.com</a>
        <a href="https://www.google.com/accounts/Logout?continue=https://developers.google.com/appengine/docs/python/tools/devserver&service=ahsid">Sign out</a>
      </div>
      <img src="./Python 开发服务器 - Google App Engine — Google Developers_files/silhouette36.png">
    </span>
    
  </div>

  <form class="gc-search" action="https://developers.google.com/search/results" method="GET">
    <div class="searchbox" style="width: 409px;">
      
      
        <span class="button button-blue mini">Google App Engine<pre>  X</pre></span>
      
      <input type="text" name="q" class="q" id="q" value="" placeholder="搜索" autocomplete="off" style="width: 263px;">
    </div>
    <button class="button button-blue" style="top: 0px; left: 424px;">
      <img src="./Python 开发服务器 - Google App Engine — Google Developers_files/search.png" alt="Search">
    </button>
    
      <input type="hidden" name="p" id="search_project" value="/appengine">
    
  </form>

</header>


<script>
  var a=window.devsite||{};window.devsite=a;var _gaq=_gaq||[];WebFontConfig={google:{families:["Open+Sans"]}};a.location=window.location;a.reloadWindow=function(){a.location.reload()};a.openWindow=window.open;a.devsite=a.devsite||{};a.devsite.dialogConfig={autoOpen:!1,modal:!0,show:"fade",dialogClass:"msgDialog",closeText:"",resizable:!1,draggable:!1,zIndex:9999};a.KD_FADE_LONG=218;a.KD_FADE_SHORT=130;a.progress=a.progress||{};a.progress.INTERVAL_TIME_MS=460;a.progress.MAX_LOOP=100;a.progress.RIGHT_MARGIN=6;a.progress.TOP_MARGIN=-15;
a.progress.kennedyProgressDot=function(d){a.progress.circleInnerHtml='<span class="mask first"><span class="base"></span><span class="mover"></span></span><span class="mask second"><span class="base"></span><span class="mover"></span></span>';a.progress.spinnerHtml='<div class="circle initial"><span class="mask"><span class="mover"></span></span></div><div class="circle red"></div><div class="circle yellow"></div><div class="circle green"></div><div class="circle blue"></div>';var c=$("<div></div>").prop("id",
"loader").prop("class","yellow").html(a.progress.spinnerHtml);c.find(".red").html(a.progress.circleInnerHtml);c.find(".blue").html(a.progress.circleInnerHtml);c.find(".green").html(a.progress.circleInnerHtml);c.find(".yellow").html(a.progress.circleInnerHtml);c.css({position:"absolute",right:a.progress.RIGHT_MARGIN+"px",top:a.progress.TOP_MARGIN+"px"});d.append(c);d=function(){this.colorIndex=-1;this.colors=["red","yellow","green","blue"];this.loader=c;this.loopCount=0;this.shouldStop=!1};d.prototype.start=
function(){var b=this;this.loader.removeClass();this.loader.addClass("firstTime");this.interval=setInterval(function(){b.loop()},a.progress.INTERVAL_TIME_MS)};d.prototype.loop=function(){this.loopCount+=1;this.loader.hasClass("firstTime")?(this.loader.removeClass("firstTime"),this.loader.addClass("initial")):this.loader.hasClass("stopped")?(this.loader.removeClass("stopped"),this.loader.addClass("finishing")):this.loader.hasClass("finishing")?(clearInterval(this.interval),c.remove()):(this.colorIndex=
(this.colorIndex+1)%this.colors.length,this.loader.removeClass(),this.loader.addClass(this.colors[this.colorIndex]),(this.shouldStop||this.loopCount>a.progress.MAX_LOOP)&&this.loader.addClass("stopped"))};d.prototype.stop=function(){this.shouldStop=!0};var f=new d;return d={start:function(){$.fx.off||f.start()},clear:function(){c.remove()},error:function(){f.stop()}}};a.progress=a.progress||{};
a.progress.progressDot=function(d){function c(){e+=1;100>e&&b.animate({opacity:"toggle"},a.KD_FADE_LONG,c)}var f=6,b=d.parent().find(".progress");b.remove();b=$("<div></div>").addClass("progress");b.css({position:"absolute","border-radius":f+"px",border:f+"px solid #3D9400",right:f+"px",top:d.parent().height()/2-f+"px",width:0,height:0});d.parent().append(b);var e=0;return d={start:function(){$.fx.off||c()},clear:function(){b.remove()},error:function(){b.stop();b.css({opacity:1,border:f+"px solid #DD4B39"})}}};a.location=window.location;a.setTimeout=function(){return window.setTimeout.apply(window,arguments)};a.clearTimeout=function(){window.clearTimeout.apply(window,arguments)};a.localInit=function(){a.search.init()};a.search={KEY_ESC:27,fadeTime:a.KD_FADE_SHORT,keyDelay:300};
a.search.init=function(){window.devsite.search.initResultHandlers();var d=$(".gc-search");d.submit(function(){if(window.devsite.geo){var b=window.devsite.geo.lat+","+window.devsite.geo.lon,b=$('<input type="hidden" name="l"/>').val(b);d.append(b)}});var c=$("#q");c.unbind("keyup click");c.bind("keyup click",function(b){a.search.timeout&&a.clearTimeout(a.search.timeout);$(this).val()&&b.keyCode!=a.search.KEY_ESC?a.search.timeout=a.setTimeout(function(){a.search.updateResults()},a.search.keyDelay):
a.search.removeAutocomplete()});var c=$(".searchbox").children(".button"),f=$("#restrict input");(f.is(":checked")||0==f.length&&0!=c.length)&&a.search.grow();$("body").delegate("#restrict input","click",function(){$(this).is(":checked")?a.search.grow($("#restrict input").val()):a.search.shrink();a.search.updateResults();$("#q").focus()})};
a.search.initResultHandlers=function(){$(".search-results .result").unbind("click");$(".search-results .result").click(function(){var d={type:$(this).data("type"),url:$(this).data("url"),hl:$(this).data("hl"),q:$(this).data("q")};$.post("/search/go",d,function(c){c&&(a.location.href=c)});return!1})};a.search.fadeOutIfExists=function(d,c,f){d&&d.length?d.fadeOut(c,f):f()};a.search.removeAutocomplete=function(){var d=$(".search-autocomplete");d.remove();a.search.lastQ=null};
a.search.grow=function(d){var c=$("#q"),f=$(".searchbox"),b=$(".gc-search").children("button"),e=f.children(".button");if(d){var e=c.val(),g=$(".results").data("query-match");g&&c.val(e.substr(g.length+1));e=$("<span></span>");e.addClass("button button-blue mini");e.text($("#restrict").find("span").text());e.data("query-match",g);f.prepend(e);g=$("<input />");g.attr({id:"search_project",type:"hidden",name:"p",value:d});$(".gc-search").append(g)}e.append($("<pre>  X</pre>"));g=$(".searchbox").width();
d=e.outerWidth(!0);var k=f.outerWidth(!0)+d;f.css("width",k+"px");c.css("width",g+"px");c=b.offset();c.left+=d+10;b.offset(c);b=function(){a.search.shrink();$("#q").focus()};e.click(b)};
a.search.shrink=function(){var d=$("#q"),c=$(".searchbox"),f=c.children("input"),b=c.children(".button"),e=b.data("query-match");e&&f.val($.trim(e)+" "+f.val());f=$(".gc-search").children("button");$("#restrict input").prop("checked",!1);$("#search_project").remove();e=b.outerWidth(!0);b.remove();b=f.offset();b.left-=e+10;c.css("width","");d.css("width","100%");f.offset(b)};
a.search.updateResults=function(){var d=$(".searchbox"),c=$("#q"),f=$("#search_project"),b={q:$.trim(c.val()||"")};window.devsite.geo&&(b.l=window.devsite.geo.lat+","+window.devsite.geo.lon);f&&f.val()&&(b.p=escape(f.val()));if(!a.search.lastQ||a.search.lastQ.q!=b.q||a.search.lastQ.p!=b.p){a.search.lastQ=b;a.search.xhr&&a.search.xhr.abort();var e=$(".search-results");b.n=e.data("n")||4;var g=a.progress.kennedyProgressDot(d);g.start();a.search.xhr=$.get("/search/results",b,function(f){g.clear();f&&
($("#what-q").text(b.q),e=$(".search-results"),a.search.fadeOutIfExists(e,a.search.fadeTime,function(){e.empty();if($.trim(f).length){if(!e.length){e=$("<div></div>").addClass("search-results search-autocomplete").data("n",4);$("body").append(e);var g=d.offset();e.css({position:"absolute",top:g.top+d.outerHeight()+3,left:g.left})}e.append(f);var g=$("#search-next"),h=e.children(".results").data("c");g.length?h?(g.attr("href","/search/results?c="+encodeURIComponent(h)+"&q="+encodeURIComponent(b.q)),
g.show()):g.hide():$("#search-full").show();$("body").bind("click.searchAutocomplete",function(b){$.contains(e.get(0),b.target)||(e.is(b.target)||c.is(b.target))||!e.hasClass("search-autocomplete")||(a.search.removeAutocomplete(),$(this).unbind("click.searchAutocomplete"))});a.search.initResultHandlers();e.fadeIn(a.search.fadeTime)}}))});a.search.xhr.error(function(){g.error()})}};


  if (window.jQuery) {
    $(document).ready(function() {
      window.devsite.search.init();

      var loginLink = $('#loginLink');
      if (loginLink.length > 0) {
        loginLink.click(devsite.devsite.login);
      }
    });
  }
</script>

      
    </div>
    

    
    

    <div id="gc-wrapper" itemscope="" itemtype="http://schema.org/Article">
      
      <input id="gc-analytics" type="hidden" value="UA-24532603-1">
      

      

      <div id="gc-topnav">
        <div>

          
          

          <ul>

            
            

            
            
            
            
            <li class=""><a href="https://developers.google.com/?hl=zh-CN">首页</a></li>
            
            <li class="active"><a href="https://developers.google.com/products/?hl=zh-CN">产品</a></li>
            
            <li class=""><a href="https://developers.google.com/events/?hl=zh-CN">会议</a></li>
            
            <li class=""><a href="https://developers.google.com/showcase/?hl=zh-CN">展示区</a></li>
            
            <li class=""><a href="https://developers.google.com/live/?hl=zh-CN">实况</a></li>
            
            <li class=""><a href="https://developers.google.com/groups/?hl=zh-CN">组</a></li>
            

            
            
            
          </ul>
        </div>
      </div>
      
      

      
      
      
        <div id="gc-appbar">
          
          
<h1>

  <a href="https://developers.google.com/appengine/?hl=zh-CN">Google App Engine</a>

  
  
  <div class="plusone-container">
    <div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; background-color: transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px; background-position: initial initial; background-repeat: initial initial;"><iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" width="100%" id="I0_1372577786758" name="I0_1372577786758" src="./Python 开发服务器 - Google App Engine — Google Developers_files/fastbutton.html" allowtransparency="true" data-gapiattached="true" title="+1"></iframe></div>
  </div>
  


<div style="float:right;">
  
  <a href="./Python 开发服务器 - Google App Engine — Google Developers_files/Python 开发服务器 - Google App Engine — Google Developers.html" class="google-feedback" data-p="70425" data-b="Docs-actual" data-context="">有关此文档的反馈</a>
</div>





</h1>


          
        </div>
      
      

      
        
      <div id="gc-main" class="main">
        
        
  
  
      
      
      <div id="gc-sidebar">
        

  



  <nav class="gc-toc"><ul><li class=""><a href="https://developers.google.com/appengine/downloads?hl=zh-CN" data-title="下载"><span>下载</span></a></li><li class=""><a href="https://developers.google.com/appengine/tools_tips?hl=zh-CN" data-title="工具和提示全新！"><span>工具和提示全新！</span></a></li><li class=""><a href="http://code.google.com/status/appengine" data-title="系统状态"><span>系统状态</span></a></li><li class=""><a href="http://code.google.com/p/googleappengine/issues/list" data-title="问题跟踪器"><span>问题跟踪器</span></a></li></ul><hr><ul><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="使用入门">使用入门</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/whatisgoogleappengine?hl=zh-CN" data-title="什么是 Google App Engine？"><span>什么是 Google App Engine？</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/gettingstarted?hl=zh-CN" data-title="Java" class="tlw-title"><span>Java</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/introduction?hl=zh-CN" data-title="简介"><span>简介</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/installing?hl=zh-CN" data-title="安装 Java SDK"><span>安装 Java SDK</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/creating?hl=zh-CN" data-title="创建项目"><span>创建项目</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/usingusers?hl=zh-CN" data-title="使用 Users 服务"><span>使用 Users 服务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/usingjsps?hl=zh-CN" data-title="使用 JSP"><span>使用 JSP</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/usingdatastore?hl=zh-CN" data-title="将数据存储区与 JDO 一起使用"><span>将数据存储区与 JDO 一起使用</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/staticfiles?hl=zh-CN" data-title="使用静态文件"><span>使用静态文件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/gettingstarted/uploading?hl=zh-CN" data-title="上传应用程序"><span>上传应用程序</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/gettingstarted?hl=zh-CN" data-title="Python" class="tlw-title"><span>Python</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/introduction?hl=zh-CN" data-title="简介"><span>简介</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/devenvironment?hl=zh-CN" data-title="开发环境"><span>开发环境</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/helloworld?hl=zh-CN" data-title="Hello, World!"><span>Hello, World!</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/usingwebapp?hl=zh-CN" data-title="使用 webapp 框架"><span>使用 webapp 框架</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/usingusers?hl=zh-CN" data-title="使用用户服务"><span>使用用户服务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/handlingforms?hl=zh-CN" data-title="使用 webapp 处理表单"><span>使用 webapp 处理表单</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/usingdatastore?hl=zh-CN" data-title="使用数据存储区"><span>使用数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/templates?hl=zh-CN" data-title="使用模板"><span>使用模板</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/staticfiles?hl=zh-CN" data-title="使用静态文件"><span>使用静态文件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/gettingstarted/uploading?hl=zh-CN" data-title="上传应用程序"><span>上传应用程序</span></a></li></ul></li></ul></li></ul><hr><ul><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="Java">Java</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/runtime?hl=zh-CN" data-title="Servlet 环境"><span>Servlet 环境</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore?hl=zh-CN" data-title="存储数据" class="tlw-title"><span>存储数据</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/entities?hl=zh-CN" data-title="实体"><span>实体</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/queries?hl=zh-CN" data-title="查询"><span>查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/transactions?hl=zh-CN" data-title="事务"><span>事务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/hr?hl=zh-CN" data-title="选择数据存储区"><span>选择数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/hr/overview?hl=zh-CN" data-title="使用 High Replication 数据存储区"><span>使用 High Replication 数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/metadataqueries?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/stats?hl=zh-CN" data-title="统计信息"><span>统计信息</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/async?hl=zh-CN" data-title="异步 API"><span>异步 API</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore/jdo?hl=zh-CN" data-title="JDO" class="tlw-title"><span>JDO</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/dataclasses?hl=zh-CN" data-title="使用 JDO 定义数据类"><span>使用 JDO 定义数据类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/creatinggettinganddeletingdata?hl=zh-CN" data-title="使用 JDO 创建、获取和删除数据"><span>使用 JDO 创建、获取和删除数据</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/relationships?hl=zh-CN" data-title="JDO 中的实体关系"><span>JDO 中的实体关系</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/queries?hl=zh-CN" data-title="JDO 中的查询"><span>JDO 中的查询</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore/jpa?hl=zh-CN" data-title="JPA" class="tlw-title"><span>JPA</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jpa/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li></ul></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary?hl=zh-CN" data-title="Javadoc 参考"><span>Javadoc 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/apis?hl=zh-CN" data-title="服务" class="tlw-title"><span>服务</span></a><ul style="display: none;"><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/blobstore?hl=zh-CN" data-title="Blobstore" class="tlw-title"><span>Blobstore</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/blobstore/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/blobstore/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore?hl=zh-CN" data-title="Datastore" class="tlw-title"><span>Datastore</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/entities?hl=zh-CN" data-title="实体"><span>实体</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/queries?hl=zh-CN" data-title="查询"><span>查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/transactions?hl=zh-CN" data-title="事务"><span>事务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/hr?hl=zh-CN" data-title="选择数据存储区"><span>选择数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/hr/overview?hl=zh-CN" data-title="使用 High Replication 数据存储区"><span>使用 High Replication 数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/metadataqueries?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/stats?hl=zh-CN" data-title="统计信息"><span>统计信息</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/async?hl=zh-CN" data-title="异步 API"><span>异步 API</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore/jdo?hl=zh-CN" data-title="JDO" class="tlw-title"><span>JDO</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/dataclasses?hl=zh-CN" data-title="使用 JDO 定义数据类"><span>使用 JDO 定义数据类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/creatinggettinganddeletingdata?hl=zh-CN" data-title="使用 JDO 创建、获取和删除数据"><span>使用 JDO 创建、获取和删除数据</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/relationships?hl=zh-CN" data-title="JDO 中的实体关系"><span>JDO 中的实体关系</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jdo/queries?hl=zh-CN" data-title="JDO 中的查询"><span>JDO 中的查询</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/datastore/jpa?hl=zh-CN" data-title="JPA" class="tlw-title"><span>JPA</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/datastore/jpa/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li></ul></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary?hl=zh-CN" data-title="Javadoc 参考"><span>Javadoc 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/images?hl=zh-CN" data-title="图片" class="tlw-title"><span>图片</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/images/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/images/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/mail?hl=zh-CN" data-title="邮件" class="tlw-title"><span>邮件</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/mail/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/mail/usingjavamail?hl=zh-CN" data-title="使用 JavaMail 发送邮件"><span>使用 JavaMail 发送邮件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/mail/receiving?hl=zh-CN" data-title="接收邮件"><span>接收邮件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/mail/package-summary?hl=zh-CN" data-title="低级 API"><span>低级 API</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/memcache?hl=zh-CN" data-title="内存缓存" class="tlw-title"><span>内存缓存</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/memcache/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/memcache/usingjcache?hl=zh-CN" data-title="使用 JCache"><span>使用 JCache</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/package-summary?hl=zh-CN" data-title="低级 API"><span>低级 API</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/multitenancy?hl=zh-CN" data-title="多租户" class="tlw-title"><span>多租户</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/multitenancy/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/multitenancy/multitenancy?hl=zh-CN" data-title="多租户和命名空间"><span>多租户和命名空间</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/multitenancy/namespaces?hl=zh-CN" data-title="命名空间的其他用法"><span>命名空间的其他用法</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/NamespaceManager?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/oauth?hl=zh-CN" data-title="OAuth" class="tlw-title"><span>OAuth</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/oauth/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/oauth/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/taskqueue?hl=zh-CN" data-title="任务队列" class="tlw-title"><span>任务队列</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/taskqueue/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/labs/taskqueue/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/urlfetch?hl=zh-CN" data-title="网址提取" class="tlw-title"><span>网址提取</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/urlfetch/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/urlfetch/usingjavanet?hl=zh-CN" data-title="使用 java.net"><span>使用 java.net</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-summary?hl=zh-CN" data-title="低级 API"><span>低级 API</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/users?hl=zh-CN" data-title="Users" class="tlw-title"><span>Users</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/users/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/xmpp?hl=zh-CN" data-title="XMPP" class="tlw-title"><span>XMPP</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/xmpp/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/xmpp/package-summary?hl=zh-CN" data-title="API 参考"><span>API 参考</span></a></li></ul></li></ul></li><li class=""><a href="https://developers.google.com/appengine/docs/java/javadoc?hl=zh-CN" data-title="服务 Javadoc"><span>服务 Javadoc</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/jrewhitelist?hl=zh-CN" data-title="JRE 类白名单"><span>JRE 类白名单</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/config?hl=zh-CN" data-title="配置" class="tlw-title"><span>配置</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/config/webxml?hl=zh-CN" data-title="部署描述符"><span>部署描述符</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/config/appconfig?hl=zh-CN" data-title="应用程序配置"><span>应用程序配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/config/indexconfig?hl=zh-CN" data-title="索引配置"><span>索引配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/config/cron?hl=zh-CN" data-title="计划任务"><span>计划任务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/config/queue?hl=zh-CN" data-title="任务队列配置"><span>任务队列配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/config/dos?hl=zh-CN" data-title="DoS 保护配置"><span>DoS 保护配置</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/configyaml?hl=zh-CN" data-title="YAML 配置" class="tlw-title"><span>YAML 配置</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/configyaml/appconfig_yaml?hl=zh-CN" data-title="YAML 应用程序配置"><span>YAML 应用程序配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/configyaml/indexconfig?hl=zh-CN" data-title="索引配置"><span>索引配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/configyaml/cron?hl=zh-CN" data-title="计划任务"><span>计划任务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/configyaml/queue?hl=zh-CN" data-title="任务队列配置"><span>任务队列配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/configyaml/dos?hl=zh-CN" data-title="DoS 保护配置"><span>DoS 保护配置</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/tools?hl=zh-CN" data-title="工具" class="tlw-title"><span>工具</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/devserver?hl=zh-CN" data-title="开发服务器"><span>开发服务器</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/uploadinganapp?hl=zh-CN" data-title="上传和管理"><span>上传和管理</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/eclipse?hl=zh-CN" data-title="Google Eclipse 插件"><span>Google Eclipse 插件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/ant?hl=zh-CN" data-title="使用 Apache Ant"><span>使用 Apache Ant</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/tools/localunittesting?hl=zh-CN" data-title="本地单元测试" class="tlw-title"><span>本地单元测试</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/localunittesting/javadoc?hl=zh-CN" data-title="测试 Javadoc"><span>测试 Javadoc</span></a></li></ul></li><li class=""><a href="https://developers.google.com/appengine/docs/java/tools/appstats?hl=zh-CN" data-title="Appstats"><span>Appstats</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/java/howto?hl=zh-CN" data-title="操作方式" class="tlw-title"><span>操作方式</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/java/howto/maintenance?hl=zh-CN" data-title="处理计划维护周期"><span>处理计划维护周期</span></a></li></ul></li></ul></li></ul><hr><ul><li class=""><a class="tlw-control tlw-expanded">▾</a><span class="tlw-title tlw-control-title" data-title="Python">Python</span><ul style=""><li class=""><a href="https://developers.google.com/appengine/docs/python/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/runtime?hl=zh-CN" data-title="CGI 环境"><span>CGI 环境</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/datastore?hl=zh-CN" data-title="存储数据" class="tlw-title"><span>存储数据</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/overview?hl=zh-CN" data-title="数据存储区概述"><span>数据存储区概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/entities?hl=zh-CN" data-title="实体"><span>实体</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/queries?hl=zh-CN" data-title="查询"><span>查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/transactions?hl=zh-CN" data-title="事务"><span>事务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/datamodeling?hl=zh-CN" data-title="数据建模"><span>数据建模</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlreference?hl=zh-CN" data-title="GQL 参考"><span>GQL 参考</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/hr?hl=zh-CN" data-title="选择数据存储区"><span>选择数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/hr/overview?hl=zh-CN" data-title="使用 High Replication 数据存储区"><span>使用 High Replication 数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/metadataqueries?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/stats?hl=zh-CN" data-title="统计"><span>统计</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/typesandpropertyclasses?hl=zh-CN" data-title="类型和 Property 类"><span>类型和 Property 类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlreference?hl=zh-CN" data-title="GQL 参考"><span>GQL 参考</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/modelclass?hl=zh-CN" data-title="Model"><span>Model</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/expandoclass?hl=zh-CN" data-title="Expando"><span>Expando</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/polymodelclass?hl=zh-CN" data-title="PolyModel"><span>PolyModel</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/propertyclass?hl=zh-CN" data-title="Property"><span>Property</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/queryclass?hl=zh-CN" data-title="Query"><span>Query</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlqueryclass?hl=zh-CN" data-title="GqlQuery"><span>GqlQuery</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/metadataqueryclass?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/keyclass?hl=zh-CN" data-title="Key"><span>Key</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/apis?hl=zh-CN" data-title="服务" class="tlw-title"><span>服务</span></a><ul style="display: none;"><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/blobstore?hl=zh-CN" data-title="Blobstore" class="tlw-title"><span>Blobstore</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/blobinfoclass?hl=zh-CN" data-title="BlobInfo"><span>BlobInfo</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/blobkeyclass?hl=zh-CN" data-title="BlobKey"><span>BlobKey</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/blobreaderclass?hl=zh-CN" data-title="BlobReader"><span>BlobReader</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/blobstore/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/datastore?hl=zh-CN" data-title="Datastore" class="tlw-title"><span>Datastore</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/overview?hl=zh-CN" data-title="数据存储区概述"><span>数据存储区概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/entities?hl=zh-CN" data-title="实体"><span>实体</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/queries?hl=zh-CN" data-title="查询"><span>查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/transactions?hl=zh-CN" data-title="事务"><span>事务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/datamodeling?hl=zh-CN" data-title="数据建模"><span>数据建模</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlreference?hl=zh-CN" data-title="GQL 参考"><span>GQL 参考</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/hr?hl=zh-CN" data-title="选择数据存储区"><span>选择数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/hr/overview?hl=zh-CN" data-title="使用 High Replication 数据存储区"><span>使用 High Replication 数据存储区</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/metadataqueries?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/stats?hl=zh-CN" data-title="统计"><span>统计</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/typesandpropertyclasses?hl=zh-CN" data-title="类型和 Property 类"><span>类型和 Property 类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlreference?hl=zh-CN" data-title="GQL 参考"><span>GQL 参考</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/modelclass?hl=zh-CN" data-title="Model"><span>Model</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/expandoclass?hl=zh-CN" data-title="Expando"><span>Expando</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/polymodelclass?hl=zh-CN" data-title="PolyModel"><span>PolyModel</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/propertyclass?hl=zh-CN" data-title="Property"><span>Property</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/queryclass?hl=zh-CN" data-title="Query"><span>Query</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/gqlqueryclass?hl=zh-CN" data-title="GqlQuery"><span>GqlQuery</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/metadataqueryclass?hl=zh-CN" data-title="元数据查询"><span>元数据查询</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/keyclass?hl=zh-CN" data-title="Key"><span>Key</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/datastore/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/images?hl=zh-CN" data-title="图片" class="tlw-title"><span>图片</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/images/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/images/installingPIL?hl=zh-CN" data-title="安装 PIL"><span>安装 PIL</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/images/usingimages?hl=zh-CN" data-title="使用图片 API"><span>使用图片 API</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/images/imageclass?hl=zh-CN" data-title="Image"><span>Image</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/images/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/images/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/mail?hl=zh-CN" data-title="邮件" class="tlw-title"><span>邮件</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/sendingmail?hl=zh-CN" data-title="发送邮件"><span>发送邮件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/receivingmail?hl=zh-CN" data-title="接收邮件"><span>接收邮件</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/attachments?hl=zh-CN" data-title="附件"><span>附件</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/emailmessageclass?hl=zh-CN" data-title="EmailMessage"><span>EmailMessage</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/emailmessagefields?hl=zh-CN" data-title="邮件字段"><span>邮件字段</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/mail/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/memcache?hl=zh-CN" data-title="内存缓存" class="tlw-title"><span>内存缓存</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/memcache/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/memcache/usingmemcache?hl=zh-CN" data-title="使用内存缓存"><span>使用内存缓存</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/memcache/clientclass?hl=zh-CN" data-title="Client"><span>Client</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/memcache/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/multitenancy?hl=zh-CN" data-title="多租户" class="tlw-title"><span>多租户</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/multitenancy/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/multitenancy/multitenancy?hl=zh-CN" data-title="使用命名空间实现多租户"><span>使用命名空间实现多租户</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/multitenancy/namespaces?hl=zh-CN" data-title="命名空间的其他用法"><span>命名空间的其他用法</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/multitenancy/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/multitenancy/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/oauth?hl=zh-CN" data-title="OAuth" class="tlw-title"><span>OAuth</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/oauth/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/oauth/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/oauth/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/taskqueue?hl=zh-CN" data-title="任务队列" class="tlw-title"><span>任务队列</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/taskqueue/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/taskqueue/tasks?hl=zh-CN" data-title="Task 类"><span>Task 类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/taskqueue/queues?hl=zh-CN" data-title="Queue 类"><span>Queue 类</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/taskqueue/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/taskqueue/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/urlfetch?hl=zh-CN" data-title="网址提取" class="tlw-title"><span>网址提取</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/urlfetch/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/urlfetch/fetchfunction?hl=zh-CN" data-title="fetch 函数"><span>fetch 函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/urlfetch/asynchronousrequests?hl=zh-CN" data-title="异步请求"><span>异步请求</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/urlfetch/responseobjects?hl=zh-CN" data-title="Response 对象"><span>Response 对象</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/urlfetch/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/users?hl=zh-CN" data-title="用户" class="tlw-title"><span>用户</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/users/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/users/userobjects?hl=zh-CN" data-title="User 对象"><span>User 对象</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/users/loginurls?hl=zh-CN" data-title="登录网址"><span>登录网址</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/users/adminusers?hl=zh-CN" data-title="管理员用户"><span>管理员用户</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/users/userclass?hl=zh-CN" data-title="User"><span>User</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/users/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/users/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/xmpp?hl=zh-CN" data-title="XMPP" class="tlw-title"><span>XMPP</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/xmpp/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/xmpp/functions?hl=zh-CN" data-title="函数"><span>函数</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/xmpp/messageclass?hl=zh-CN" data-title="消息"><span>消息</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/xmpp/exceptions?hl=zh-CN" data-title="异常"><span>异常</span></a></li></ul></li></ul></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/config?hl=zh-CN" data-title="配置" class="tlw-title"><span>配置</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/config/appconfig?hl=zh-CN" data-title="应用程序配置"><span>应用程序配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/config/indexconfig?hl=zh-CN" data-title="索引配置"><span>索引配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/config/cron?hl=zh-CN" data-title="计划任务"><span>计划任务</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/config/queue?hl=zh-CN" data-title="任务队列配置"><span>任务队列配置</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/config/dos?hl=zh-CN" data-title="DoS 保护配置"><span>DoS 保护配置</span></a></li></ul></li><li class=""><a class="tlw-control tlw-expanded">▾</a><a href="https://developers.google.com/appengine/docs/python/tools?hl=zh-CN" data-title="工具" class="tlw-title"><span>工具</span></a><ul style=""><li class="active"><a href="./Python 开发服务器 - Google App Engine — Google Developers_files/Python 开发服务器 - Google App Engine — Google Developers.html" data-title="开发服务器"><span>开发服务器</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/uploadinganapp?hl=zh-CN" data-title="上传和管理"><span>上传和管理</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/uploadingdata?hl=zh-CN" data-title="上传和下载数据"><span>上传和下载数据</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/tools/webapp?hl=zh-CN" data-title="webapp 框架" class="tlw-title"><span>webapp 框架</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/overview?hl=zh-CN" data-title="概述"><span>概述</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/running?hl=zh-CN" data-title="运行应用程序"><span>运行应用程序</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/requesthandlers?hl=zh-CN" data-title="请求处理程序"><span>请求处理程序</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/requestdata?hl=zh-CN" data-title="请求数据"><span>请求数据</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/buildingtheresponse?hl=zh-CN" data-title="构建响应"><span>构建响应</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/redirects?hl=zh-CN" data-title="重定向、标头和状态代码"><span>重定向、标头和状态代码</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/blobstorehandlers?hl=zh-CN" data-title="Blobstore 处理程序"><span>Blobstore 处理程序</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="参考">参考</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/requestclass?hl=zh-CN" data-title="请求"><span>请求</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/responseclass?hl=zh-CN" data-title="响应"><span>响应</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/requesthandlerclass?hl=zh-CN" data-title="RequestHandler"><span>RequestHandler</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/wsgiapplicationclass?hl=zh-CN" data-title="WSGIApplication"><span>WSGIApplication</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/webapp/utilmodule?hl=zh-CN" data-title="实用程序函数"><span>实用程序函数</span></a></li></ul></li></ul></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/appstats?hl=zh-CN" data-title="Appstats"><span>Appstats</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/python/tools/libraries?hl=zh-CN" data-title="第三方库"><span>第三方库</span></a></li></ul></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><a href="https://developers.google.com/appengine/docs/python/howto?hl=zh-CN" data-title="操作方式" class="tlw-title"><span>操作方式</span></a><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/python/howto/maintenance?hl=zh-CN" data-title="处理计划的维护期"><span>处理计划的维护期</span></a></li></ul></li></ul></li></ul><hr><ul><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="管理应用程序">管理应用程序</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/docs/theadminconsole?hl=zh-CN" data-title="管理控制台"><span>管理控制台</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/quotas?hl=zh-CN" data-title="配额"><span>配额</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/billing?hl=zh-CN" data-title="计费"><span>计费</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/domain?hl=zh-CN" data-title="使用自定义域"><span>使用自定义域</span></a></li></ul></li></ul><hr><ul><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="资源">资源</span><ul style="display: none;"><li class=""><a href="https://developers.google.com/appengine/kb?hl=zh-CN" data-title="常见问题解答"><span>常见问题解答</span></a></li><li class=""><a href="https://developers.google.com/appengine/articles?hl=zh-CN" data-title="文章"><span>文章</span></a></li><li class=""><a href="http://appengine-cookbook.appspot.com/" data-title="解决方案总汇"><span>解决方案总汇</span></a></li><li class=""><a href="http://code.google.com/p/googleappengine/" data-title="SDK 代码"><span>SDK 代码</span></a></li><li class=""><a href="http://code.google.com/p/datanucleus-appengine/" data-title="JDO/JPA 代码"><span>JDO/JPA 代码</span></a></li><li class=""><a href="http://code.google.com/p/google-app-engine-samples/" data-title="示例应用程序代码"><span>示例应用程序代码</span></a></li><li class=""><a class="tlw-control tlw-collapsed">▸</a><span class="tlw-title tlw-control-title" data-title="启动器代码">启动器代码</span><ul style="display: none;"><li class=""><a href="http://code.google.com/p/google-appengine-mac-launcher/" data-title="苹果机"><span>苹果机</span></a></li><li class=""><a href="http://code.google.com/p/google-appengine-wx-launcher/" data-title="Windows/wx"><span>Windows/wx</span></a></li></ul></li><li class=""><a href="https://developers.google.com/appengine/community?hl=zh-CN" data-title="论坛"><span>论坛</span></a></li></ul></li></ul><hr><ul><li class=""><a href="https://developers.google.com/appengine/docs/roadmap?hl=zh-CN" data-title="产品路线图"><span>产品路线图</span></a></li><li class=""><a href="http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes" data-title="发行说明：Python"><span>发行说明：Python</span></a></li><li class=""><a href="http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes" data-title="发行说明：Java"><span>发行说明：Java</span></a></li><li class=""><a href="https://developers.google.com/appengine/docs/revision_history?hl=zh-CN" data-title="修订历史记录"><span>修订历史记录</span></a></li><li class=""><a href="https://developers.google.com/appengine/terms?hl=zh-CN" data-title="Terms of Service"><span>Terms of Service</span></a></li></ul></nav>



      </div>
      

      <div id="gc-content">
        
        <div>
  
          
  
  <h1 itemprop="name" class="page-title">Python 开发服务器</h1>
  
  <div itemprop="articleBody">
  


<p>App Engine Python SDK 包含一个可在您的计算机上运行的网络服务器应用程序，可模拟在 App Engine Python 运行时环境中运行的应用程序。该模拟环境强制实施某些沙盒限制，如受限制的系统功能和 Python 模块导入，但没有请求超时或配额之类的其他限制。服务器还通过本地执行任务来模拟服务。</p>

<ul>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Running_the_Development_Web_Server">运行开发网络服务器</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Using_the_Datastore">使用数据存储区</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Using_Users">使用 Users 服务</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Using_Mail">使用邮件</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Using_URL_Fetch">使用网址提取</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#The_Development_Console">开发控制台</a></li>
  <li><a href="https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-CN#Command_Line_Arguments">命令行参数</a></li>
</ul>


<h2 id="Running_the_Development_Web_Server">运行开发网络服务器</h2>

<p>当您获得应用程序的目录以及 <a href="https://developers.google.com/appengine/docs/python/config/appconfig?hl=zh-CN">app.yaml</a> 配置文件后，即可通过 <code>dev_appserver.py</code> 命令启动开发网络服务器：</p>

<pre>dev_appserver.py myapp
</pre>

<p>默认情况下，网络服务器在端口 8080 上进行监听。您可以在以下网址访问该应用程序：<a href="http://localhost:8080/">http://localhost:8080/</a></p>

<p>要更改网络服务器使用的端口，请使用 <code>--port</code> 选项：</p>

<pre>dev_appserver.py --port=9999 myapp
</pre>

<p>要中断网络服务器：在 Windows 环境下，请在命令提示窗口中按 Ctrl-Break 键。在 Mac OS X 或 Unix 环境下，请按 Control-C 键。</p>

<p>该网络服务器在运行时会监视您对文件所做的更改，如有需要，还会重新载入这些文件。对于大多数类型的更改，您只需编辑文件然后在浏览器中重新载入该网页。在某些情况下（例如，当应用程序进行动态导入时），您可能需要重新启动该网络服务器以重设模块导入缓存。</p>

<p>一定要使用 Python 2.5 运行 <code>dev_appserver.py</code>。尽管它可使用 Python 2.4 运行，但 Python 2.4 和 2.5 之间的差别有可能会影响应用程序的功能（例如对 Unicode 字符串的处理）。</p>


<h2 id="Using_the_Datastore">使用数据存储区</h2>

<p>开发网络服务器可以使用您计算机上的一个文件模拟 App Engine 数据存储区。在网络服务器的调用之间，此文件仍然存在，因此当下一次运行该网络服务器时，您所存储的数据仍将可用。</p>

<p>要清除应用程序的本地数据存储区，请在启动该网络服务器时使用 <code>--clear_datastore</code> 选项：</p>

<pre>dev_appserver.py --clear_datastore myapp
</pre>

<p>该网络服务器会在启动时将其正在使用的数据存储区文件的位置打印到终端。您可以创建该文件的副本，稍后对其进行还原以将该数据存储区重设为已知状态。请确保在替换数据存储区文件后重新启动网络服务器。</p> 

<p>要更改数据存储区文件使用的位置，请使用 <code>--datastore_path</code> 选项：</p>

<pre>dev_appserver.py --datastore_path=/tmp/myapp_datastore myapp
</pre>

<p>当您的应用程序在数据存储区上执行查询时，开发网络服务器会检查应用程序的 <code>index.yaml</code> 文件是否支持该查询。如果该查询要求在文件中提及其索引，那么服务器将生成一个索引并将该索引添加到此文件中。如果您的应用程序可以尝试执行未进行测试的查询，那么您可能想要编辑此文件。</p>

<p>自创建或上次清除数据存储区文件以来所执行的每个查询都会生成 <code>index.yaml</code>。查询历史记录会存储在单独的文件中。要更改历史记录文件的位置，请以类似于使用 <code>--history_path</code> 选项的方式使用 <code>--datastore_path</code> 选项。</p>

<p>有关索引和 <code>index.yaml</code> 的详细信息，请参阅<a href="https://developers.google.com/appengine/docs/python/datastore/queriesandindexes?hl=zh-CN">查询和索引</a>以及<a href="https://developers.google.com/appengine/docs/python/config/indexconfig?hl=zh-CN">配置索引</a>。</p>

<h3 id="Switching_to_SQLite_for_Your_Local_Datastore">为本地数据存储区切换至 SQLite</h3>

<p>如果将大量数据存储在数据存储区中，则可将本地数据存储存根的后台切换至 SQLite，以此提高性能并缩短起动时间。</p>

<p><b>注意：</b>在 SQLite 和标准的数据存储区后台之间进行切换时，将会擦除本地数据存储区。</p>

<p>要切换至 SQLite，请使用 <code>--use_sqlite</code> 选项。</p>

<pre>dev_appserver.py --use_sqlite
</pre>

<h2 id="Using_Users">使用 Users 服务</h2>

<p>开发网络服务器可以使用自己的登录和退出页面模拟 Google 帐户。在开发网络服务器下运行时，<a href="https://developers.google.com/appengine/docs/python/users/functions?hl=zh-CN#create_login_url">users.create_login_url</a> 和 <a href="https://developers.google.com/appengine/docs/python/users/functions?hl=zh-CN#create_logout_url">users.create_logout_url</a> 函数将返回本地服务器上的 <code>/_ah/login</code> 和 <code>/_ah/logout</code> 的网址。</p>

<p>开发登录页面包含一个表单，您可以在该表单中输入一个电子邮件地址。不管您输入了什么电子邮件地址，您的会话都会将其作为有效用户使用。</p>

<p>要使应用程序认定登录的用户为管理员，请选中表单上的  复选框。</p>


<h2 id="Using_Mail">使用邮件</h2>

<p>开发网络服务器可发送电子邮件以调用 App Engine 邮件服务。要启用电子邮件支持，必须为网络服务器提供用选项来指定要使用的邮件服务器。网络服务器可以使用 SMTP 服务器，也可以使用本地安装的 <a href="http://www.sendmail.org/">Sendmail</a>。</p>

<p>要启用使用 SMTP 服务器的邮件支持，请使用 <code>--smtp_host</code>、<code>--smtp_port</code>、<code>--smtp_user</code> 和 <code>--smtp_password</code> 选项以及相应的值。</p>

<pre>dev_appserver.py --smtp_host=smtp.example.com --smtp_port=25 \
    --smtp_user=ajohnson --smtp_password=k1tt3ns myapp
</pre>

<p>要启用使用 Sendmail 的邮件支持，请使用 <code>--enable_sendmail</code> 选项。网络服务器将使用 <code>sendmail</code> 命令，根据您安装时的默认配置发送电子邮件。</p>

<pre>dev_appserver.py --enable_sendmail myapp
</pre>

<p>如果未启用使用 SMTP 或 Sendmail 的邮件，那么，尝试从应用程序发送电子邮件的操作将无效，但是在应用程序中则会显示为发送成功。</p> 


<h2 id="Using_URL_Fetch">使用网址提取</h2>

<p>当您的应用程序使用网址提取 API 创建 HTTP 请求时，开发网络服务器将直接从您的计算机创建该请求。如果您使用代理服务器访问网站，那么，这种行为可能与在 App Engine 上运行应用程序时不同。</p>

<p class="note"><b>注意：</b><code>dev_appserver.py</code> 一次只能提供一个请求。如果您的应用程序在处理请求的同时对自身创建了网址提取请求，那么在使用开发网络服务器时，这些请求将会失败（如果是在 App Engine 上运行，那么请求将不会失败）。要测试这些请求，您可以在其他端口上运行 <code>dev_appserver.py</code> 的另一实例，然后对您的应用程序进行编码以在对其自身创建请求时使用其他服务器。</p>


<h2 id="The_Development_Console">开发控制台</h2>

<p>开发网络服务器包括一个控制台网络应用程序。通过该控制台，您可以浏览本地数据存储区，并可通过将 Python 代码提交到网络表单与该应用程序进行交互。</p>



<p>要访问该控制台，请访问您服务器上的网址 <code>/_ah/admin</code>：<a href="http://localhost:8080/_ah/admin">http://localhost:8080/_ah/admin</a></p>




<h2 id="Command_Line_Arguments">命令行参数</h2>

<p><code>dev_appserver.py</code> 命令支持以下命令行参数：</p>

<dl>
  <dt><code>--datastore_path=<i>...</i></code></dt>
  <dd>
    <p>用于本地数据存储区数据文件的路径。如果文件不存在，服务器将创建该文件。</p>
  </dd>

  <dt><code>--history_path=<i>...</i></code></dt>
  <dd>
    <p>用于本地数据存储区历史记录文件的路径。服务器使用查询历史记录文件来生成 <code>index.yaml</code> 的条目。</p>
  </dd>

  <dt><code>--debug</code></dt>
  <dd>
    <p>运行时将详细的调试消息打印到该控制台。</p>
  </dd>

  <dt><code>--help</code></dt>
  <dd>
    <p>打印有用的消息，然后退出。</p>
  </dd>

  <dt><code>--login_url=<i>...</i></code></dt>
  <dd>
    <p>用于用户登录页面的相关网址。默认为 <code>/_ah/login</code>。</p>
  </dd>

  <dt><code>--port=<i>...</i></code></dt>
  <dd>
    <p>用于该服务器的端口号。默认为 <code>8080</code>。</p>
  </dd>

  <dt><code>--address=<i>...</i></code></dt>
  <dd>
    <p>用于该服务器的主机地址。您可能需要设置该地址，以便能够从网络上的其他计算机访问该开发服务器。地址 <code>0.0.0.0</code> 允许进行本地主机访问和主机名访问。默认为 <code>localhost</code>。</p>
  </dd>

  <dt><code>--clear_datastore</code></dt>
  <dd>
    <p>在启动网络服务器之前，先清除数据存储区数据和历史记录文件。</p>
  </dd>

  <dt><code>--require_indexes</code></dt>
  <dd>
    <p>禁止 <code>index.yaml</code> 文件中自动生成条目。当应用程序创建的查询要求在该文件中定义其索引，而未找到索引定义时，会引发异常，这与在 App Engine 上运行时发生的情况类似。</p>
  </dd>

  <dt><code>--smtp_host=<i>...</i></code></dt>
  <dd>
    <p>用于发送电子邮件的 SMTP 服务器主机名。</p>
  </dd>

  <dt><code>--smtp_port=<i>...</i></code></dt>
  <dd>
    <p>用于发送电子邮件的 SMTP 服务器端口号。</p>
  </dd>

  <dt><code>--smtp_user=<i>...</i></code></dt>
  <dd>
    <p>该 SMTP 服务器上用于发送电子邮件的用户名。</p>
  </dd>

  <dt><code>--smtp_password=<i>...</i></code></dt>
  <dd>
    <p>该 SMTP 服务器上用于发送电子邮件的密码。</p>
  </dd>

  <dt><code>--enable_sendmail</code></dt>
  <dd>
    <p>使用本地计算机上安装的 Sendmail 发送电子邮件。</p>
  </dd>

  <dt><code>--debug_imports</code></dt>
  <dd>
    <p>打印与导入模块相关的调试消息（包含搜索路径和错误）。</p>
  </dd>

</dl>


  
  </div>

  
        </div>
        
<div id="gc-content-footer">

<div id="gc-content-license">

    
      
        <p>Except as otherwise <a href="https://developers.google.com/readme/policies?hl=zh-CN">noted</a>, the content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>, and code samples are licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>.</p>
      
    
    
    

</div>



<div itemprop="datePublished" content="2013-06-20T23:01:47.365270" id="gc-content-last-updated">Last updated 六月 20, 2013.</div>

</div>




      </div>
  

        
      </div>
        
      

      
      
      <footer id="gc-footer">
        <div id="gc-copyright">
          <a href="https://developers.google.com/?hl=zh-CN">
            <img id="developers-logo-footer" src="./Python 开发服务器 - Google App Engine — Google Developers_files/developers-logo-footer.png" alt="Google Developers logo" style="vertical-align: center; float: left">
          </a>
          <ul>
            <li><a href="http://www.google.com/">Google</a></li>
            <li><a href="https://developers.google.com/readme/terms?hl=zh-CN">服务条款</a></li>
            <li><a href="http://www.google.com/intl/en/privacy/">隐私权政策</a></li>
            <li><a href="https://developers.google.com/jobs?hl=zh-CN">求职招聘</a></li>
            <li><a class="google-feedback" data-p="81425" data-b="Documentation" data-v="devsite-20130628-rc00.default" href="./Python 开发服务器 - Google App Engine — Google Developers_files/Python 开发服务器 - Google App Engine — Google Developers.html">报告错误</a></li>
          </ul>
        </div>
        
        <div id="gc-language">
          <ul>
            <li>
              <form id="setlang" action="https://developers.google.com/i18n/setlang/" method="post">
                <div style="display:none"><input type="hidden" name="csrfmiddlewaretoken" value="f8bba8f1b86fa4a62007ba5e868bb3d4"></div>
                <select id="footer_language" name="language" style="display: none;">
                  
                  
                  <option value="ar">
                    العربيّة
                  </option>
                  
                  <option value="bg">
                    български
                  </option>
                  
                  <option value="ca">
                    català
                  </option>
                  
                  <option value="zh-cn" selected="selected">
                    简体中文
                  </option>
                  
                  <option value="zh-tw">
                    繁體中文
                  </option>
                  
                  <option value="hr">
                    Hrvatski
                  </option>
                  
                  <option value="cs">
                    česky
                  </option>
                  
                  <option value="da">
                    Dansk
                  </option>
                  
                  <option value="nl">
                    Nederlands
                  </option>
                  
                  <option value="en">
                    English
                  </option>
                  
                  <option value="fa">
                    فارسی
                  </option>
                  
                  <option value="fi">
                    suomi
                  </option>
                  
                  <option value="fr">
                    Français
                  </option>
                  
                  <option value="de">
                    Deutsch
                  </option>
                  
                  <option value="el">
                    Ελληνικά
                  </option>
                  
                  <option value="he">
                    עברית
                  </option>
                  
                  <option value="hi">
                    Hindi
                  </option>
                  
                  <option value="hu">
                    Magyar
                  </option>
                  
                  <option value="id">
                    Bahasa Indonesia
                  </option>
                  
                  <option value="it">
                    italiano
                  </option>
                  
                  <option value="ja">
                    日本語
                  </option>
                  
                  <option value="ko">
                    한국어
                  </option>
                  
                  <option value="lv">
                    latviešu
                  </option>
                  
                  <option value="lt">
                    Lithuanian
                  </option>
                  
                  <option value="nb">
                    Norsk (bokmål)
                  </option>
                  
                  <option value="nn">
                    Norsk (nynorsk)
                  </option>
                  
                  <option value="pl">
                    polski
                  </option>
                  
                  <option value="pt-br">
                    Português Brasileiro
                  </option>
                  
                  <option value="pt">
                    Português
                  </option>
                  
                  <option value="ro">
                    Română
                  </option>
                  
                  <option value="ru">
                    Русский
                  </option>
                  
                  <option value="sr">
                    српски
                  </option>
                  
                  <option value="sk">
                    slovenský
                  </option>
                  
                  <option value="sl">
                    Slovenščina
                  </option>
                  
                  <option value="es">
                    español
                  </option>
                  
                  <option value="sv">
                    Svenska
                  </option>
                  
                  <option value="th">
                    Thai
                  </option>
                  
                  <option value="tr">
                    Türkçe
                  </option>
                  
                  <option value="uk">
                    Українська
                  </option>
                  
                  <option value="vi">
                    Vietnamese
                  </option>
                  
                </select><span class="kd-button kd-menubutton kd-select"><div style="display: inline-block;"><div class="label" style="float: left;">
                    简体中文
                  </div><div class="kd-disclosureindicator"></div></div></span>
              </form>
            </li>
          </ul>
        </div>
        
      </footer>
      
      
    </div>
    <div id="needAuth" class="msgDialogContent">
      
      <h1>要求进行身份验证</h1>
      
      <div>
        您需要登录到 <a href="http://www.google.com/+">Google+</a> 中才能执行该操作。
      </div>
      <button>登录</button>
      <button>取消</button>
    </div>
    <div id="signingIn" class="msgDialogContent">
      
      <h1>正在登录...</h1>
      <div>
        
        Google 开发者必须得到您的许可才能执行该操作。
      </div>
      
      <button>重试</button>
      
      <button>取消</button>
    </div>
    <script src="./Python 开发服务器 - Google App Engine — Google Developers_files/script_foot.js"></script>
    <script>
      (function($) {
        devsite.devsite.Init($, null, '');
      })(jQuery);

      
      devsite.localInit = function() {
        
      };
      
    </script>
    <!-- Google Code for PXL - Developers - Codesite - HP - 90d Remarketing List -->
    <script type="text/javascript">
    $('#setlang select').each(function() {
      if ($.browser.msie) {
        $(this).change(function() {
          $('#setlang').submit();
        });
      } else {
        $(this).kdSelect({'change': function() {
          $('#setlang').submit();
        }});
      }
    });
    </script><ul class="kd-menulist" style="position: absolute; left: 1133px; top: 10232.78125px; display: none;"><li class="kd-menulistitem" style="">
                    العربيّة
                  </li><li class="kd-menulistitem">
                    български
                  </li><li class="kd-menulistitem">
                    català
                  </li><li class="kd-menulistitem selected" style="font-weight: normal;">
                    简体中文
                  </li><li class="kd-menulistitem">
                    繁體中文
                  </li><li class="kd-menulistitem">
                    Hrvatski
                  </li><li class="kd-menulistitem">
                    česky
                  </li><li class="kd-menulistitem">
                    Dansk
                  </li><li class="kd-menulistitem">
                    Nederlands
                  </li><li class="kd-menulistitem">
                    English
                  </li><li class="kd-menulistitem">
                    فارسی
                  </li><li class="kd-menulistitem">
                    suomi
                  </li><li class="kd-menulistitem">
                    Français
                  </li><li class="kd-menulistitem">
                    Deutsch
                  </li><li class="kd-menulistitem">
                    Ελληνικά
                  </li><li class="kd-menulistitem">
                    עברית
                  </li><li class="kd-menulistitem">
                    Hindi
                  </li><li class="kd-menulistitem">
                    Magyar
                  </li><li class="kd-menulistitem">
                    Bahasa Indonesia
                  </li><li class="kd-menulistitem">
                    italiano
                  </li><li class="kd-menulistitem">
                    日本語
                  </li><li class="kd-menulistitem">
                    한국어
                  </li><li class="kd-menulistitem">
                    latviešu
                  </li><li class="kd-menulistitem">
                    Lithuanian
                  </li><li class="kd-menulistitem">
                    Norsk (bokmål)
                  </li><li class="kd-menulistitem">
                    Norsk (nynorsk)
                  </li><li class="kd-menulistitem">
                    polski
                  </li><li class="kd-menulistitem">
                    Português Brasileiro
                  </li><li class="kd-menulistitem">
                    Português
                  </li><li class="kd-menulistitem">
                    Română
                  </li><li class="kd-menulistitem">
                    Русский
                  </li><li class="kd-menulistitem">
                    српски
                  </li><li class="kd-menulistitem">
                    slovenský
                  </li><li class="kd-menulistitem">
                    Slovenščina
                  </li><li class="kd-menulistitem">
                    español
                  </li><li class="kd-menulistitem">
                    Svenska
                  </li><li class="kd-menulistitem">
                    Thai
                  </li><li class="kd-menulistitem">
                    Türkçe
                  </li><li class="kd-menulistitem">
                    Українська
                  </li><li class="kd-menulistitem">
                    Vietnamese
                  </li></ul>
    <script type="text/javascript">
      /* <![CDATA[ */
      var google_conversion_id = 992540712;
      var google_conversion_language = "en";
      var google_conversion_format = "3";
      var google_conversion_color = "ffffff";
      var google_conversion_label = "qio2CKCPwQMQqPCj2QM";
      var google_conversion_value = 0;
      /* ]]> */
    </script>
    <script type="text/javascript" src="./Python 开发服务器 - Google App Engine — Google Developers_files/conversion.js">
    </script><img height="1" width="1" border="0" src="./Python 开发服务器 - Google App Engine — Google Developers_files/saved_resource(1)">

    

    <script>
      
      google.load('visualization', '1', {packages: ['table']});
    </script><script src="./Python 开发服务器 - Google App Engine — Google Developers_files/saved_resource(2)" type="text/javascript"></script><script src="./Python 开发服务器 - Google App Engine — Google Developers_files/format+zh_CN,default,table.I.js" type="text/javascript"></script>

    <noscript>
      &lt;div style="display:inline;"&gt;
        &lt;img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/992540712/?label=qio2CKCPwQMQqPCj2QM&amp;amp;guid=ON&amp;amp;script=0"/&gt;
      &lt;/div&gt;
    </noscript>
    





<script type="text/javascript">
$(document).ready(function(e) {
    // Render any carousels on the page
    $('.carousel').carousel();
    // Render any feed widgets on the page
    
    $('.feed').rss();
    $('.feed-plain').rss();
    // Render any OSS widgets on the page.
    $('.oss').oss();
    });
</script>

<script type="text/javascript" defer="">


$(document).ready(function() {
    contentTimer.name = 'content';
    contentTimer.tick('ol');
    window.jstiming.report(contentTimer);

    // Boilerplate javascript to enable the plusone button
    var po = document.createElement('script'); po.type = 'text/javascript';
    po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js?onload=devsite_plusoneLoaded';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(po, s);
});
</script>





  

  

</body></html>